<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jquery-3.4.1.js"></script>
</head>
<body>
<form >
    <input type="checkbox" name="xieyi" id="box"  value="1">同意并接受注册协议
    <br>
    <input type="submit" value="提交">
</form>
<script>
    let type = $('input')[0];
let input = $('input')[1];
input.onclick=function(){
    if(type[type='checked']===false){
        alert('不同意协议，我们将无法为您提供服务')
    }else{
        alert("提交成功")
    }
}
</script>
</body>
</html>